<@override name="head">
<title>广告主分配记录</title>
<link rel="stylesheet" href="${ctx}/assets/css/daterangepicker.css" />

<script type="text/javascript" src="${ctx}/assets/js/lib/moment.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.daterangepicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/date.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/table.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/dropDownList.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/shortcutkey_datePicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/advertiser/finance.js"></script>
</@override>
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
    <div id= "pagecontent">
    	<div id="contentOther">
   			<div id="navDiv">
				<ul id="navDiv_ul">
					<li><i class="icon-home"></i></li>
					<li><a href="${ctx}/advertiser/main/dashboard">首页</a></li>
					<li><i class="icon-angle-right"></i></li>
				    <li><a href="${ctx}/advertiser/main/finance/adv-balance/list">财务管理</a></li>
				    <li><i class="icon-angle-right"></i></li>
				    <li class="navDiv_currentLi">广告主分配记录</li>
				</ul>  
 			</div>
 			<form id="myform" action="${ctx}/advertiser/main/finance/adv-balance/distribution" method="post">
 				<input id="page" name="page" type="hidden" value="${pager.page}"/>
 				<div id="navButtons">
					<div id="button">					
						<#if advertiserIdFinance == 0>
						<a href="${ctx}/advertiser/main/finance/finance-data/list" class="btn2">资金管理</a>
					<#else>
						<a href="${ctx}/advertiser/main/finance/adv-balance/list" class="btn2">广告主消费记录</a>
					</#if>					
					<a href="${ctx}/advertiser/main/finance/adv-balance/distribution" class="btn2">广告主分配记录</a>
					</div>
				</div>
				<div id="selectuls">
					<div class="selectuls_finance_div">
						<span class="selectuls_finance_span">广告主：</span>
						<ul id="main_advertiserul">
							<li class="select_box" id="advertiserul_box">
								<span id="advertiserul_span">${selectedAdvertiserName!}</span>
								<ul class="son_ul" id="advertiser_son_ul"></ul>
							</li>
						</ul>
						<input type="hidden" name="selectedAdvertiserId" id="advertiserId" value="${advertiserId!}">
						<input type="hidden" name="selectedAdvertiserName" id="advertiserName" value="${selectedAdvertiserName!}">
					</div>
					<div class="selectuls_finance_div">
						<span class="selectuls_finance_span">查看周期：</span>
						<span id="calendar_span">
							<i class="icon-calendar"></i>   
							<input type="text" name="dateRangePicker" id="dateRangePicker" value="${dateRangePicker!}" readonly/>
						</span>
					</div>
					<input id="btn_formSubmit" type="submit" value="查询"/>
					<a id="btn_formExport" href="javascript:void(0);" onClick="exportExcel_distribution()">导出Excel</a>
				</div>
				<table border="1" class="tableFig">
					<thead>
						<tr class="theadTr">
							<th class="theadTh" style="width:5%;"><div class="checkboxStyleTh"></div></th>
							<th class="theadTh" style="width:15%;">时间</th>
							<th class="theadTh" style="width:15%;">广告主</th>
							<th class="theadTh" style="width:20%;">分配金额（元）</th>
							<th class="theadTh" style="width:20%;">消耗信用额度（元）</th>
							<th class="theadTh" style="width:20%;">可用信用额度（元）</th>
						</tr>
				    </thead>
				    <tbody>
						<#if advBalanceList ??>
				        <#list advBalanceList as advBalance>
				        <tr id="tbodyTr">
							<td class="tbodyTd"><div class="checkboxStyleTd" id="${advBalance.id!}"></div></td>
							<td class="tbodyTd">${advBalance.actTime!?date}</td>
							<td class="tbodyTd">${advBalance.advertiserName!}</td>
							<td class="tbodyTd">${advBalance.allocate?string(",##0.00#")!}</td>
							<td class="tbodyTd">${advBalance.consume?string(",##0.00#")!}</td>
							<td class="tbodyTd">${advBalance.balance?string(",##0.00#")!}</td>
						</tr>
				        </#list>
						</#if>           
				    </tbody>
				</table>
				<div id="pageDiv-other">
					<#include "/common/pagination/simple.ftl"/>
				</div>
 			</form>
		</div>
	</div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>